package com.yitiao.multithread;

import java.util.concurrent.locks.ReentrantLock;

/**
 * @author libiao
 */
public class MySync {

    public synchronized void hello(){
        System.out.println("-----hello");
    }
    public static void main(String[] args) {
        Object o = new Object();
        synchronized (o){
            System.out.println("--------------sync");
        }
        MySync mySync = new MySync();
        mySync.hello();
        ReentrantLock lock = new ReentrantLock(true);
    }

}
